package sv.gob.mh.dgii.model;
// Generated 05-27-2010 10:16:02 AM by Hibernate Tools 3.2.2.GA


import java.util.Date;
import javax.persistence.AttributeOverride;
import javax.persistence.AttributeOverrides;
import javax.persistence.Column;
import javax.persistence.EmbeddedId;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * GdUnidaXTipd generated by hbm2java
 */
@Entity
@Table(name="GD_UNIDA_X_TIPD"
    ,schema="GDOCCALIDAD"
)
public class GdUnidaXTipd  implements java.io.Serializable {


     private GdUnidaXTipdId id;
     private GdTipoDocum gdTipoDocum;
     private Date fhingreso;
     private Integer bactivo;

    public GdUnidaXTipd() {
    }

    public GdUnidaXTipd(GdUnidaXTipdId id, GdTipoDocum gdTipoDocum, Date fhingreso, Integer bactivo) {
       this.id = id;
       this.gdTipoDocum = gdTipoDocum;
       this.fhingreso = fhingreso;
       this.bactivo = bactivo;
    }
   
     @EmbeddedId
    
    @AttributeOverrides( {
        @AttributeOverride(name="cunidad", column=@Column(name="C_UNIDAD", nullable=false, length=5) ), 
        @AttributeOverride(name="ctipoDoc", column=@Column(name="C_TIPO_DOC", nullable=false, length=8) ) } )
    public GdUnidaXTipdId getId() {
        return this.id;
    }
    
    public void setId(GdUnidaXTipdId id) {
        this.id = id;
    }
@ManyToOne(fetch=FetchType.LAZY)
    @JoinColumn(name="C_TIPO_DOC", nullable=false, insertable=false, updatable=false)
    public GdTipoDocum getGdTipoDocum() {
        return this.gdTipoDocum;
    }
    
    public void setGdTipoDocum(GdTipoDocum gdTipoDocum) {
        this.gdTipoDocum = gdTipoDocum;
    }
    @Temporal(TemporalType.DATE)
    @Column(name="FH_INGRESO", nullable=false, length=7)
    public Date getFhingreso() {
        return this.fhingreso;
    }
    
    public void setFhingreso(Date fhingreso) {
        this.fhingreso = fhingreso;
    }
    
    @Column(name="B_ACTIVO", nullable=false, precision=1, scale=0)
    public Integer getBactivo() {
        return this.bactivo;
    }
    
    public void setBactivo(Integer bactivo) {
        this.bactivo = bactivo;
    }




}


